1
00:00:00,600 --> 00:00:07,830
Hello and welcome to this select show in this lecture and we will be creating two variables.

2
00:00:07,830 --> 00:00:19,050
One would be to reference the comebacks from javascript and this second will be to stall to day rendering

3
00:00:19,120 --> 00:00:28,050
contex So we use that to render to do graphics on the comebacks before you can actually render graphics

4
00:00:28,140 --> 00:00:29,400
on the canvas.

5
00:00:29,460 --> 00:00:36,480
You need to actually reference a compass with javascript so does what we going to do now is create a

6
00:00:36,480 --> 00:00:41,240
variable to reference the compass.

7
00:00:41,610 --> 00:00:48,710
So this is why fold up the file some going to open that folder and access the javascript.

8
00:00:48,700 --> 00:00:54,090
I'm to go right click hunger or head it saw this as the javascript.

9
00:00:54,090 --> 00:00:56,770
This is where going to quit the variable.

10
00:00:56,910 --> 00:01:03,300
So the first variable I am going to create will be to reference the comebacks so to create a variable

11
00:01:03,300 --> 00:01:04,230
you type in the.

12
00:01:04,250 --> 00:01:09,400
Are full of bind in name you want to give the variable for simplicity.

13
00:01:09,400 --> 00:01:10,780
How core this can.

14
00:01:11,220 --> 00:01:21,590
That's like case and the value of a variable would be of course to document.

15
00:01:22,620 --> 00:01:33,230
Don't get element but a D to what this is saying that the value for lives come by as will be documento

16
00:01:33,240 --> 00:01:39,760
get LMM by a T and that is a reference to a comeback.

17
00:01:39,990 --> 00:01:47,880
Remember when we created the cumbersome we'll give we give the come first and I did value off my comeback.

18
00:01:47,880 --> 00:01:52,360
So let's take a look at that so this is my CML.

19
00:01:52,470 --> 00:01:54,570
Notice here when they come to us was great.

20
00:01:54,600 --> 00:02:02,790
We give it and I devalue off my comforts so this is what we are going to give to Javascript to reference

21
00:02:02,790 --> 00:02:03,510
to Compass.

22
00:02:03,510 --> 00:02:09,000
Let's flip back to the javascript so the name is Mike come that's.

23
00:02:11,620 --> 00:02:13,930
Always surround the values in quotes.

24
00:02:13,930 --> 00:02:16,920
My comebacks.

25
00:02:19,390 --> 00:02:26,010
The value of the idea must be in the exact way it was specified.

26
00:02:26,000 --> 00:02:33,370
If I go back to my index notice I've called in my -- that's so I must specify the same way.

27
00:02:33,640 --> 00:02:43,010
If not a javascript can't reference it so I have created a variable that will reference the comebacks.

28
00:02:43,330 --> 00:02:47,440
So this is canvas variable here.

29
00:02:47,500 --> 00:02:53,090
The value will be equal to B I d off the compass.

30
00:02:53,090 --> 00:02:57,400
I have created N which is my canvas.

31
00:02:57,790 --> 00:03:04,840
Now that would create the kind that's going to create on another variable that would be used

32
00:03:07,840 --> 00:03:19,270
to store to d rendering context so the variable records S.T. X which is short for context and the value

33
00:03:19,780 --> 00:03:24,160
of that variable will be variable.

34
00:03:24,160 --> 00:03:28,400
Here a creative call come about which will become of us.

35
00:03:28,550 --> 00:03:36,410
Dont get the context.

36
00:03:36,910 --> 00:03:45,520
So they get context is C is an object in javascript that refused to access or do stuff on the compass

37
00:03:46,120 --> 00:03:51,960
so it takes one value and the value is too deep.

38
00:03:54,570 --> 00:03:55,460
All right.

39
00:03:55,750 --> 00:03:58,100
I'm thinkin that.

40
00:04:01,240 --> 00:04:05,790
I always put the semicolon at the end of your variables when you created them.

41
00:04:06,050 --> 00:04:10,640
So the first variable here access this become bus.

42
00:04:10,850 --> 00:04:15,950
The second variable here which is this context here.

43
00:04:15,980 --> 00:04:23,590
What this will do it will store any to the rendering would do to come.

44
00:04:23,600 --> 00:04:30,460
So any drawing any stuff we do on cover as it will store that value inside is variable.

45
00:04:30,650 --> 00:04:38,640
Okay so this this here is responsible for any drawing or painting that is done on the compass.

46
00:04:38,720 --> 00:04:46,360
It will be stored use in this variable so just sit for this lecture in the next lecture.

47
00:04:46,400 --> 00:04:50,240
We will be drawn in on the combat's.

48
00:04:50,330 --> 00:04:51,170
Take care.

49
00:04:51,170 --> 00:04:52,090
Bye for now.